@echo off
if "%path:~-1%" == ";" (
  goto:end_path_add_
)
path=%path%;
:end_path_add_

echo %path% | findstr/c:"C:\\Programs\\go\\go1.19.3;" >nul && (
  goto:end_path_add_go
)
path=%path%C:\Programs\go\go1.19.3\bin;
:end_path_add_go

